<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es" >
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>FacturaScripts</title>
   <meta name="description" content="FacturaScripts es un software de facturación y contabilidad para pymes. Es software libre bajo licencia GNU/AGPL." />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <link rel="shortcut icon" href="view/img/favicon.ico" />
   <link rel="stylesheet" href="view/css/bootstrap-yeti.min.css" />
   <script type="text/javascript" src="view/js/jquery-2.1.1.min.js"></script>
   <script type="text/javascript" src="view/js/bootstrap.min.js"></script>
   <script type="text/javascript" src="view/js/jquery.ui.shake.js"></script>
   <script type="text/javascript">
      $(document).ready(function() {
         {if condition="$fsc->get_errors()"}
         $("#box_login").shake();
         {/if}
         
         document.f_login.user.focus();
         
         $("#b_feedback").click(function(event) {
            event.preventDefault();
            $("#modal_feedback").modal('show');
            document.f_feedback.feedback_text.focus();
         });
      });
   </script>
</head>
<body>
   <nav class="navbar navbar-default" role="navigation" style="margin: 0px;">
      <div class="container-fluid">
         <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
               <span class="sr-only">Toggle navigation</span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.php">FacturaScripts</a>
         </div>
         
         <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
               <li>
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" title="Ayuda">
                     <span class="glyphicon glyphicon-question-sign hidden-xs"></span>
                     <span class="visible-xs">Ayuda</span>
                  </a>
                  <ul class="dropdown-menu">
                     <li><a href="{#FS_COMMUNITY_URL#}/questions.php">Preguntas</a></li>
                     <li><a href="{#FS_COMMUNITY_URL#}/errors.php">Errores</a></li>
                     <li><a href="{#FS_COMMUNITY_URL#}/ideas.php">Sugerencias</a></li>
                     <li><a href="{#FS_COMMUNITY_URL#}/all.php">Todo</a></li>
                     <li class="divider"></li>
                     <li><a href="#" id="b_feedback">Informar...</a></li>
                  </ul>
               </li>
            </ul>
         </div>
      </div>
   </nav>
   
   {if condition="$fsc->get_errors()"}
   <div class="alert alert-danger">
      <ul>{loop="$fsc->get_errors()"}<li>{$value}</li>{/loop}</ul>
   </div>
   {/if}
   {if condition="$fsc->get_messages()"}
   <div class="alert alert-success">
      <ul>{loop="$fsc->get_messages()"}<li>{$value}</li>{/loop}</ul>
   </div>
   {/if}
   {if condition="$fsc->get_advices()"}
   <div class="alert alert-info">
      <ul>{loop="$fsc->get_advices()"}<li>{$value}</li>{/loop}</ul>
   </div>
   {/if}
   
   <div class="visible-md visible-lg" style="margin-bottom: 100px;"></div>
   
   <form name="f_login" action="index.php?nlogin={$nlogin}" method="post" class="form" role="form">
      <div class="container">
         <div class="row" style="margin-top: 20px;">
            <div class="col-md-3 col-md-offset-3">
               <div class="thumbnail">
                  <img src="view/img/big_lock.png" alt="login"/>
               </div>
            </div>
            <div class="col-md-3">
               <div class="form-group">
                  <input type="text" name="user" class="form-control input-lg" placeholder="Usuario" autocomplete="off"/>
               </div>
               <div class="form-group">
                  <input type="password" class="form-control input-lg" name="password" maxlength="20" placeholder="Contraseña"/>
               </div>
               <button class="btn btn-block btn-primary" type="submit" onclick="this.disabled=true;this.form.submit();">
                  <span class="glyphicon glyphicon-log-in"></span> &nbsp; Iniciar sesión
               </button>
            </div>
         </div>
      </div>
   </form>
   
   <div class="visible-md visible-lg" style="margin-bottom: 100px;"></div>
   
   {include="feedback"}
   
   <hr style="margin-top: 50px;"/>
   
   <div class="container-fluid" style="margin-bottom: 10px;">
      <div class="row">
         {if condition="FS_DB_HISTORY"}
         <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="panel panel-default">
               <div class="panel-heading">
                  <h3 class="panel-title">Consultas SQL:</h3>
               </div>
               <div class="panel-body">
                  <ol style="font-size: 11px; margin: 0px; padding: 0px 0px 0px 20px;">
                  {loop="$fsc->get_db_history()"}<li>{$value}</li>{/loop}
                  </ol>
               </div>
            </div>
         </div>
         {/if}
      </div>
      <div class="row">
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6">
            <small>
               Creado con <a target="_blank" href="//www.facturascripts.com">FacturaScripts</a>.
            </small>
         </div>
         <div class="col-lg-4 col-md-4 col-sm-4 hidden-xs text-center">
            <span class="label label-default">Consultas: {$fsc->selects()}</span>
            <span class="label label-default">Transacciones: {$fsc->transactions()}</span>
         </div>
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 text-right">
            <span class="label label-default">Procesado en: {$fsc->duration()}</span>
         </div>
      </div>
   </div>
</body>
</html>